﻿#ifndef SQLITEBASIC_H
#define SQLITEBASIC_H

#include <QObject>
#include <QSqlDatabase>
#include <QDebug>
#include <QSqlError>
#include <QSqlQuery>

class SqliteBasic : public QObject
{
    Q_OBJECT
public:
    explicit SqliteBasic(QObject *parent = nullptr, const QString &databaseName = "test");

    bool openDb();

    bool execute(const QString &sql);

    QSqlQuery query(const QString &sql);

    void closeDb();

signals:

private:
    QSqlDatabase database;

};

#endif // SQLITEBASIC_H
